package cn.snowheart.ssm.web;

import cn.snowheart.ssm.service.IDepartmentService;
import cn.snowheart.ssm.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liuwanxiang
 * @version 2018/4/22
 */
@RestController
@RequestMapping("/department")
public class DepartmentController {

    @Autowired
    private IDepartmentService departmentService;

    @RequestMapping("/list.json")
    public Object list(){
        return ResponseUtil.success(departmentService.list());
    }

}
